package com.itao.mybatis.mapper;

import com.itao.mybatis.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.jdbc.SQL;

/**
 * @author sjt
 * @Date 2025/2/13 10:58
 */
public class UserMapperProvider {


    public String selectUser(@Param("user") User user){
        return new  SQL(){{
            SELECT("*");
            FROM("user");
            WHERE("user_name = #{user.userName}");
            WHERE("age = #{user.age}");
        }}.toString();
    }

    public String selectUser1(User user){
        return new  SQL(){{
            SELECT("*");
            FROM("user");
            WHERE("user_name = #{userName}");
            WHERE("age = #{age}");
        }}.toString();
    }
}
